﻿using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Office.Interop.Word;

namespace WFL.Office.Word
{
    public class WordComment
    {
        private readonly object _lock = new object();

        private WordRange _range;
        public WordRange Range
        {
            get
            {
                if (_range == null)
                {
                    lock (_lock) { if (_range == null) { _range = new WordRange(_comment.Range); } }
                }
                return _range;
            }
        }


        private Comment _comment;

        internal WordComment(Comment comment)
        {
            _comment = comment;
        }

        public void Delete()
        {
            _comment.Delete();
        }
    }
}
